{% extends 'airshow/base.html' %}

{% block title %}{{ event.title }} - 活动详情{% endblock %}

{% block content %}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="{% url 'airshow:index' %}">首页</a></li>
        <li class="breadcrumb-item"><a href="{% url 'airshow:schedule_list' %}">活动日程</a></li>
        <li class="breadcrumb-item active" aria-current="page">{{ event.title }}</li>
    </ol>
</nav>

<div class="card mb-4">
    <div class="card-header">
        <h3>{{ event.title }}</h3>
    </div>
    <div class="card-body">
        <div class="row">
            <div class="col-md-6">
                <p><strong>活动ID：</strong> {{ event.event_id }}</p>
                <p><strong>活动时间：</strong> {{ event.event_time|date:"Y-m-d H:i" }}</p>
            </div>
            <div class="col-md-6">
                <p>
                    <strong>展品：</strong> 
                    {% if event.exhibit %}
                        展品{{ event.exhibit.exhibit_id }}
                    {% else %}
                        无关联展品
                    {% endif %}
                </p>
            </div>
        </div>
    </div>
</div>

<div class="card">
    <div class="card-header d-flex justify-content-between align-items-center">
        <h4>参与者列表</h4>
    </div>
    <div class="card-body">
        {% if attendees %}
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>姓名</th>
                            <th>类型</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for attendee in attendees %}
                            <tr>
                                <td>{{ attendee.audience_id }}</td>
                                <td>{{ attendee.name|default:"未知" }}</td>
                                <td>{{ attendee.audience_type }}</td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        {% else %}
            <p class="text-center">该活动暂无参与者</p>
        {% endif %}
    </div>
</div>
{% endblock %} 